<?php

class Application_Form_TrainUnits extends Zend_Form
{

    public function init()
    {
        $unitsTrainNr = new Zend_Form_Element_Text('unitsNrTrain');
        $unitsTrainNr->setLabel('Insert number of units:')
        		->addValidator('Int')
                ->setRequired(true)
        		->setAttrib('size','10');
                  
        $unitTrainType = new Zend_Form_Element_Hidden('buildingTrainingName');  
         
        $errorTrainLabel = new Zend_Form_Element_Hidden('errorTrainLabel');
        $errorTrainLabel->setLabel('');
        
                
        $train = new Zend_Form_Element_Submit('train');
        $train->setLabel('TRAIN');
                
        $this->addElements(array(
        				$unitTrainType,
                        $unitsTrainNr,
                        $train,
                        $errorTrainLabel
                        ));
                        
        $this->setAction('/buildings/train'); 

        $this->setElementDecorators(array('ViewHelper','Label'));

        $train->setDecorators(array('ViewHelper'));
        
		$this->setDecorators(array(
				'FormElements',
				array('HtmlTag', array('tag' => 'div', 'class'=> 'buildForm', 'id'=>'style')),
				'Form'
				));
    }


}

